import request from '@/router/axios'

export function fetchEimsPromotionList(query) {
  return request({
    url: '/eims/promotion/page',
    method: 'get',
    params: query
  })
}

export function addEimsPromotionObj(obj) {
  return request({
    url: '/eims/promotion',
    method: 'post',
    data: obj
  })
}

export function getEimsPromotionObj(id) {
  return request({
    url: '/eims/promotion/' + id,
    method: 'get'
  })
}

export function delEimsPromotionObj(id) {
  return request({
    url: '/eims/promotion/' + id,
    method: 'delete'
  })
}

export function putEimsPromotionObj(obj) {
  return request({
    url: '/eims/promotion',
    method: 'put',
    data: obj
  })
}

//审核
export function auditInfo(id) {
  return request({
    url: '/eims/promotion/audit/' + id,
    method: 'get'
  })
}

//反审核
export function noAuditInfo(id) {
  return request({
    url: '/eims/promotion/noAudit/' + id,
    method: 'get'
  })
}

//恢复
export function openInfo(id) {
  return request({
    url: '/eims/promotion/open/' + id,
    method: 'get'
  })
}

//停用
export function stopInfo(id) {
  return request({
    url: '/eims/promotion/stop/' + id,
    method: 'get'
  })
}